#!/bin/bash
echo "===== 系统健康检查 ====="
echo -n "时间: " && date
echo -n "主机名: " && hostname
echo -n "负载: " && uptime | awk -F 'load average: ' '{print $2}'
echo "内存使用: " && free -h
echo "磁盘使用: " && df -h
echo "TOP进程: " && ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head -n 6